package com.xishu.entity.customer;

import com.xishu.entity.AbstractEntity;
import io.swagger.annotations.ApiModelProperty;

import javax.persistence.Entity;
import javax.persistence.Index;
import javax.persistence.Table;

/**
 * 任务执行的历史情况
 */
@Entity(name = "task_execute_history")
@Table(indexes = {
        @Index(columnList = "taskId", name = "taskIndex"),
        @Index(columnList = "taskType", name = "taskType"),
        @Index(columnList = "executeTime", name = "executeTime"),
        @Index(columnList = "customerId", name= "customerId")
})
public class TaskExecuteHistory extends AbstractEntity {
    @ApiModelProperty(value = "任务ID")
    @Deprecated
    private Long taskId;

    @ApiModelProperty(value = "用会员的ID")
    private Long customerId;

    @ApiModelProperty(value = "任务类型，1是会员等级送优惠券，2是营销任务")
    private int taskType;

    @ApiModelProperty(value = "任务的执行的时间，根据不同的周期来记录，如果是年MM-dd，如果是月MM，如果是周 day-dd,如果是每天，yyyy-MM-dd，如果是定时任务，那么是yyyy-MM-dd")
    private String executeTime;

    @ApiModelProperty(value = "哪一个会员等级的任务的优惠券的配置，全局唯一")
    private Long levelTicketId;

    @ApiModelProperty(value = "具体是哪一个会员等级的任务")
    private Long levelId;

    @ApiModelProperty(value = "优惠券的ID")
    private Long ticketId;

    public Long getCustomerId() {
        return customerId;
    }

    public void setCustomerId(Long customerId) {
        this.customerId = customerId;
    }

    public Long getLevelTicketId() {
        return levelTicketId;
    }

    public void setLevelTicketId(Long levelTicketId) {
        this.levelTicketId = levelTicketId;
    }

    public Long getTicketId() {
        return ticketId;
    }

    public void setTicketId(Long ticketId) {
        this.ticketId = ticketId;
    }

    public Long getLevelId() {
        return levelId;
    }

    public void setLevelId(Long levelId) {
        this.levelId = levelId;
    }

    public String getExecuteTime() {
        return executeTime;
    }

    public void setExecuteTime(String executeTime) {
        this.executeTime = executeTime;
    }

    public Long getTaskId() {
        return taskId;
    }

    public void setTaskId(Long taskId) {
        this.taskId = taskId;
    }

    public int getTaskType() {
        return taskType;
    }

    public void setTaskType(int taskType) {
        this.taskType = taskType;
    }
}
